package generator.domain;

import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName consultation_records
 */
@Data
public class ConsultationRecords {
    /**
     * 咨询记录主键
     */
    private Integer id;

    /**
     * 关联预约ID（业务层校验）
     */
    private Integer appointmentId;

    /**
     * 关联用户ID（业务层校验）
     */
    private Integer userId;

    /**
     * 关联咨询师ID（业务层校验）
     */
    private Integer counselorId;

    /**
     * 实际开始时间
     */
    private LocalDateTime startTime;

    /**
     * 实际结束时间
     */
    private LocalDateTime endTime;

    /**
     * 咨询内容摘要
     */
    private String contentSummary;

    /**
     * 咨询师内部备注
     */
    private String counselorNotes;

    /**
     * 用户反馈
     */
    private String userFeedback;

    /**
     * 咨询记录（如录音/视频）URL
     */
    private String recordUrl;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ConsultationRecords other = (ConsultationRecords) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAppointmentId() == null ? other.getAppointmentId() == null : this.getAppointmentId().equals(other.getAppointmentId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCounselorId() == null ? other.getCounselorId() == null : this.getCounselorId().equals(other.getCounselorId()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getContentSummary() == null ? other.getContentSummary() == null : this.getContentSummary().equals(other.getContentSummary()))
            && (this.getCounselorNotes() == null ? other.getCounselorNotes() == null : this.getCounselorNotes().equals(other.getCounselorNotes()))
            && (this.getUserFeedback() == null ? other.getUserFeedback() == null : this.getUserFeedback().equals(other.getUserFeedback()))
            && (this.getRecordUrl() == null ? other.getRecordUrl() == null : this.getRecordUrl().equals(other.getRecordUrl()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAppointmentId() == null) ? 0 : getAppointmentId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCounselorId() == null) ? 0 : getCounselorId().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getContentSummary() == null) ? 0 : getContentSummary().hashCode());
        result = prime * result + ((getCounselorNotes() == null) ? 0 : getCounselorNotes().hashCode());
        result = prime * result + ((getUserFeedback() == null) ? 0 : getUserFeedback().hashCode());
        result = prime * result + ((getRecordUrl() == null) ? 0 : getRecordUrl().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", appointmentId=").append(appointmentId);
        sb.append(", userId=").append(userId);
        sb.append(", counselorId=").append(counselorId);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", contentSummary=").append(contentSummary);
        sb.append(", counselorNotes=").append(counselorNotes);
        sb.append(", userFeedback=").append(userFeedback);
        sb.append(", recordUrl=").append(recordUrl);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append("]");
        return sb.toString();
    }
}